<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>gluttonousSnake</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body, html {
            width: 100%;
            height: 100%;
            min-width: 1200px;
        }

        .wrap {
            width: 100%;
            height: 100%;
            box-sizing: border-box;
            padding-left: 300px;
            position: relative;
        }

        .wrap .f-btn-box {
            position: absolute;
            left: 0;
            width: 300px;
            height: 100%;
            background-color: #c6c6c6;
        }

        .wrap .f-btn-box .f-btn {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
        }

        .wrap .f-btn-box .f-btn .l-tip {
            line-height: 30px;
            text-indent: 2rem;
            padding: 20px 0;
        }

        .wrap .f-btn-box .f-btn .btn {
            padding: 5px 10px;
            cursor: pointer;
        }

        .wrap .l-canvas-box {
            width: 100%;
            height: 100%;
            box-sizing: border-box;
            position: relative;
        }

        .wrap .l-canvas-box #my-canvas {
            width: 900px;
            height: 450px;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
        }

        #sound {
            position: fixed;
            left: 0;
            top: 0;
        }
    </style>
</head>
<body>
<video src="" width="0" height="0" id="sound"></video>
<div class="wrap">
    <div class="f-btn-box">
        <div class="f-btn">
            <button id="f-start" class="btn">点击开始</button>
            <p class="l-tip"> 上下左右控制方向，空格切换暂停/开始</p>
        </div>
    </div>
    <div class="l-canvas-box" id="l-canvas-box">
        <canvas id="my-canvas"></canvas>
    </div>
</div>
</body>
<script src="./gluttonousSnake.js"></script>
<script>
    Snake()
</script>
</html>